import {addWithdraw, getWithdrawRecordList,getIncomeRecordList,getIncomeRecordDetail} from "@/api/money/index";

const money = {
    mutations: {},
    actions: {
        //新增提现
        AddWithdraw({commit}, data) {
            return new Promise((resolve, reject) => {
                addWithdraw(data).then(res => {
                    resolve(res)
                }).catch(error => {
                    reject(error)
                })
            })
        },
        //提现记录列表
        GetWithdrawRecordList({commit}, data) {
            return new Promise((resolve, reject) => {
                getWithdrawRecordList(data).then(res => {
                    resolve(res)
                }).catch(error => {
                    reject(error)
                })
            })
        },
        //收益记录列表
        GetIncomeRecordList({commit}, data) {
            return new Promise((resolve, reject) => {
                getIncomeRecordList(data).then(res => {
                    resolve(res)
                }).catch(error => {
                    reject(error)
                })
            })
        },
        //收益记录详情
        GetIncomeRecordDetail({commit}, data) {
            return new Promise((resolve, reject) => {
                getIncomeRecordDetail(data).then(res => {
                    resolve(res)
                }).catch(error => {
                    reject(error)
                })
            })
        }
    }
}

export default money